package br.com.sigmah.domain.repository;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import br.com.sigmah.domain.entity.Usuario;

@Component
public class LoginDataManager extends AbstractDataManager<Usuario,Integer>{


	public LoginDataManager() {
		super(Usuario.class);
	}

	public void save(Usuario usuario) {
		getEntityManager().persist(usuario);
	}

	@SuppressWarnings("unchecked")
	public List<Usuario> list() {
		return getEntityManager().createQuery("select t from curso t")
				.getResultList();
	}

	
}
